package org.ezplatform.office.forum.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.ezplatform.core.annotation.MetaData;
import org.ezplatform.core.entity.BaseCorpEntity;

/**
 * @desc 论坛版块实体类
 * @create 2017-11-14 19:57
 **/
@MetaData(value = "论坛版块")
@Entity(name = "ForumBoard")
@Table(name = "oa_forum_board", uniqueConstraints = { @UniqueConstraint(columnNames = "id") })
public class ForumBoard extends BaseCorpEntity {

    private static final long serialVersionUID = 6076161954035826131L;
    
    /**
     * 所属类型id
     */
    @MetaData(value = "所属类型")
    @Column(name = "forum_type", length = 32)
    private String forumType;
    
    /**
     * 名称
     */
    @MetaData(value = "名称")
    @Column(name = "name", length = 50)
    private String name;

    /**
     * 编码
     */
    @MetaData(value = "编码")
    @Column(name = "code", length = 20)
    private String code;

    /**
     * 状态
     */
    @MetaData(value = "状态")
    @Column(name = "status")
    private int status;

    /**
     * 是否匿名:1-是;0-否
     */
    @MetaData(value = "是否匿名")
    @Column(name = "is_anonymity")
    private int isAnonymity;

    /**
     * 是否审核:1-是;0-否
     */
    @MetaData(value = "是否审核")
    @Column(name = "is_check")
    private int isCheck;
    
    /**
     * 是否昵称:1-是;0-否
     */
    @MetaData(value = "是否昵称")
    @Column(name = "is_petname")
    private int isPetname;

    /**
     * 排序
     */
    @MetaData(value = "排序")
    @Column(name = "sort_no")
    private int sortNo;

    /**
     * 描述
     */
    @MetaData(value = "描述")
    @Column(name = "description", length = 500 )
    private String description;
    
    /**
     * 版主信息
     */
    @MetaData(value = "版主信息")
    @Column(name = "moderator", length = 2000)
    private String moderator;

    /**
     * 删除标识
     */
    @MetaData(value = "删除标识")
    @Column(name = "is_delete")
    private int isDelete;

    /**
     * 是否版块导航显示
     */
    @MetaData(value = "是否版块导航显示")
    @Column(name = "is_navigation")
    private int isNavigation;
    
    /**
     * 推荐时间
     */
    @MetaData(value = "推荐时间")
    @Column(name = "recommend_time")
    private Date recommendTime;
    
	/**
     * 附件
     */
    @MetaData(value = "附件")
    @Column(name = "att_id", length = 2000 )
    private String attId;
    
    /**
     * 适用范围
     */
	@MetaData(value = "适用范围")
    @Column(name = "aplication_scope")
    private String aplicationScope;
	
	public String getAplicationScope() {
		return aplicationScope;
	}

	public void setAplicationScope(String aplicationScope) {
		this.aplicationScope = aplicationScope;
	}
    
    public String getAttId() {
  		return attId;
  	}

  	public void setAttId(String attId) {
  		this.attId = attId;
  	}
    
    @Transient
    private String moderatorName;
    
    @Transient
    private String upPost;
    
    public String getModeratorName() {
		return moderatorName;
	}

	public void setModeratorName(String moderatorName) {
		this.moderatorName = moderatorName;
	}

	public String getUpPost() {
		return upPost;
	}

	public void setUpPost(String upPost) {
		this.upPost = upPost;
	}

	public String getUpPostData() {
		return upPostData;
	}

	public void setUpPostData(String upPostData) {
		this.upPostData = upPostData;
	}

	@Transient
    private String upPostData;

    public String getForumType() {
        return forumType;
    }

    public void setForumType(String forumType) {
        this.forumType = forumType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getIsAnonymity() {
        return isAnonymity;
    }

    public void setIsAnonymity(int isAnonymity) {
        this.isAnonymity = isAnonymity;
    }

    public int getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(int isCheck) {
        this.isCheck = isCheck;
    }

    public int getIsPetname() {
		return isPetname;
	}

	public void setIsPetname(int isPetname) {
		this.isPetname = isPetname;
	}

	public int getSortNo() {
        return sortNo;
    }

    public void setSortNo(int sortNo) {
        this.sortNo = sortNo;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

	public String getModerator() {
	
		return moderator;
	}

	public void setModerator(String moderator) {
	
		this.moderator = moderator;
	}

    public int getIsDelete() {
        return isDelete;
    }

	public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }

    public int getIsNavigation() {
        return isNavigation;
    }

    public void setIsNavigation(int isNavigation) {
        this.isNavigation = isNavigation;
    }
    
    public Date getRecommendTime() {
		return recommendTime;
	}

	public void setRecommendTime(Date recommendTime) {
		this.recommendTime = recommendTime;
	}
}
